
    <style>
	        input[type="checkbox"] {
	       		 appearance:none;
	            -webkit-appearance: none;
	            background:  url(__PUBLIC__/img/canyuhuodong_gou@2x.png) no-repeat;
	            height: 22px;
	            vertical-align: middle;
	            width: 22px;
	            background-size: 100% 100%;
	            -webkit-border: none;
	            hidefocus;
	        }
	       input[type="checkbox"]:checked {
	       		 appearance:none;
	            background:  url(__PUBLIC__/img/canyuhuodong_gou_press@2x.png) no-repeat;
	            -webkit-box-shadow:none;
	            height: 22px;
	            vertical-align: middle;
	            width: 22px;
	            background-size: 100% 100%;
	             -webkit-border: none;
	        }
	    </style>
<div class="page-group">
	<div class="page" data-page="book_kind">
		<header class="bar bar-nav">
			<a onclick="window.location.href='{:U('User/index')}'" class="icon" style="width: 40%">
				<img src="__PUBLIC__/img/iconfont_back@2x.png" class="back_img">
			</a>
		</header>
		<div class="content" style="">
					<div style="padding: 10px 10px 0px 10px;text-align: center;">
							<img id="enroll" src="__PUBLIC__/img/registered@2x.png" style="height: 60px"  onclick="Enroll()">
							<img id="noenroll" src="__PUBLIC__/img/noregistration_press@2x.png" style="margin-left: 50px;height:60px" onclick="NoEnroll()">
					</div>
					<div style="padding:5px;background:white;">
						<volist name="d" id="v">
							<p class="apply_no">订单号:{$v.apply_id}</p>
							<div style="position: relative;margin-top:10px">
									<!--input name="goods_check"  onclick="whoIsChecked();" value="123.30"  type="checkbox"  style="position: absolute;right: 5px;top:5px;" -->
								<img src="{$v.a_logo}" style="width: 100%;height:8rem;" onclick="window.location.href='{:U("Activity/detail","id=".$v["activity_id"])}'">
							</div>
							<input id="goto_pay"  type="button"  onclick="Unifiedorder({$v.pay_id})" style="width: 98%;background: #EC623E;padding: 5px;color:#FFF;border:none;border-radius:5px;" value="结算(应付:￥{$v.money})">
						</volist>
					</div>
					<div style="text-align: center;margin-top: 20px;margin-bottom: 20px;">
						<!--input id="goto_check"  type="button"   style="width: 98%;background: #EC623E;padding: 5px;color:#FFF;border:none;border-radius:5px;" value="结算(0)">
						<input id="money" style="display:none"-->

					</div>
		</div>
	</div>
</div>
<script>
		function Enroll(){
			window.location.href="{:U('User/activity_join')}";
		}
		function NoEnroll(){
			window.location.href="{:U('User/activity_notjoin')}";
		}


		//统一下单
		function Unifiedorder($pay_id){
			$(this).attr("onclick", "");
			$.post("{:U('Order/getJsApiParameters_activity')}",{id:$pay_id},function(data){
				var data= eval('(' + data + ')');
				if(data.status=="error"){
					alert(data.message);
				}
				if(data.status=="success"){
					//支付
					callpay(data.message);
				}
			});
		}

		//微信支付
		function callpay(data)
		{
			if (typeof WeixinJSBridge == "undefined"){
				if( document.addEventListener ){
					document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
				}else if (document.attachEvent){
					document.attachEvent('WeixinJSBridgeReady', jsApiCall);
					document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
				}
			}else{
				jsApiCall(data);
			}
		}

		function jsApiCall($jsApiParameters)
		{
			WeixinJSBridge.invoke(
					'getBrandWCPayRequest',
					eval('(' + $jsApiParameters + ')'),
					function(res){
						WeixinJSBridge.log(res.err_msg);
						//alert(res.err_code+res.err_desc+res.err_msg);
						window.location.reload();
					}
			);
		}
</script>